Program on Servlets
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class Sample extends HttpServlet
{
public void init(ServletConfig conf)throws ServletException
{
super.init(conf);
}
public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException
{
response.setContentType("text/html");
PrintWriter pw = response.getWriter();
pw.println("<html> ");
pw.println("<head></head> ");
pw.println("<body bgcolor=red> ");
pw.println("<h1>Welcome to Servlets ,Vision Computers </h1> ");
pw.println("</body> ");
pw.println("</html> ");
pw.close();
}
}